(function () {
    
    chrome.browserAction.onClicked.addListener(function (tab) {
        chrome.tabs.getSelected(null, function(tab) {
            var url = chrome.extension.getURL('driver.html') + '?tabid=' + tab.id;
            window.open( url, 'cqstyle' + String(new Date()), 'menubar=0,width=900,height=500,location=1');
            //chrome.windows.create({ url: url }, function(window) {});
        });
    });
    
})();